﻿using UnityEngine;
using System.Collections;

public class BattleSetting : MonoBehaviour {

	private static BattleSetting instance;
	
	public static BattleSetting Instance{
		get{
			return instance;
		}
	}
	
	void Awake()
	{
		instance = this;
		old_useAttackCamFocus=useAttackCamFocus;
		old_useSupportAtkCamFocus=useSupportAtkCamFocus;
		old_showPlayerHpBar = showPlayerHpBar;
		old_showEnemyHpBar = showEnemyHpBar;
	}

	//public float delayAfterTurn = 1.0f;
	public float idle2CheckDelayMin = 30;
	public float idle2CheckDelayMax = 60;
	public float idle2Prob = 30;
	public float supportAtkDelay = 0.1f;//원호 공격들간에 딜레이//
	public float supportCamFocusSpeed = 20;
	public float attackCamFocusSpeed = 3;
	public float attackCamTargetOffset = 2;
	public float supportAtkCamForwardOffset = 3.2f;
	public float supportAtkCamBackInterpolaTime = 0.1f;
	public float nextTurnAheadTime = 0.3f;
	public bool useAttackCamFocus=true;
	public bool useSupportAtkCamFocus=true;
	public float overdriveModeTime = 10.0f;
	public float overdriveModeTimeScale = 2.0f;
	public float bossBattleAudioListenerAhead = 10.0f;
	public bool noCameraShakeInTake;
	public bool showPlayerHpBar=true;
	public bool showEnemyHpBar=false;
	[HideInInspector]
	public bool old_showPlayerHpBar;
	[HideInInspector]
	public bool old_showEnemyHpBar;
	public bool showPlayerHpBarOnChange;
	public bool showEnemyHpBarOnChange=true;
	public float showHpBarTime=1.5f;

	bool old_useAttackCamFocus;
	bool old_useSupportAtkCamFocus;

	public void ToggleAtkCamFocus(bool bActivate)
	{
		if(bActivate) {
			useAttackCamFocus=old_useAttackCamFocus;
			useSupportAtkCamFocus=old_useSupportAtkCamFocus;
		}
		else {
			old_useAttackCamFocus=useAttackCamFocus;
			old_useSupportAtkCamFocus=useSupportAtkCamFocus;
			useAttackCamFocus=false;
			useSupportAtkCamFocus=false;
		}
	}
}
